<?php
$this->pageTitle=Yii::app()->name . ' - Login';
$this->breadcrumbs=array(
);
?>
<div class="well">
	<div class="navbar">
		<div class="navbar-inner">
			<i class="icon-chevron-right"></i> Đăng nhập
		</div>
	</div>
	<div class="row-fluid">
	<?php
  	if(Yii::app()->user->hasFlash('notice')) {
  		echo '<div class="alert alert-notice">'.Yii::app()->user->getFlash('notice').'</div>';
  	} 
  ?>
		<?php $form=$this->beginWidget('CActiveForm', array(
			  'id'=>'loginForm',
		    'enableClientValidation'=>true,
      	'clientOptions'=>array(
      		'validateOnSubmit'=>true,
      	),
			  'action'=> Yii::app()->request->baseUrl . '/site/login',
		    'htmlOptions'=>array('class'=>'form-horizontal'),
)); ?>
			<p class="note">Những trường đánh dấu <span class="required">*</span> là trường bắt buộc.</p>
      <?php echo $form->errorSummary($model,'','',array('class'=>'alert alert-error')); ?>
      <div class="control-group">
        <?php echo $form->labelEx($model,'username', array('class'=>'control-label')); ?>
        <?php echo $form->textField($model,'username',array('placeholder'=>'Tên đăng nhập','style'=>'width: 300px','required'=>'required')); ?>
      </div>

      <div class="control-group">
        <?php echo $form->labelEx($model,'password', array('class'=>'control-label')); ?>
        <?php echo $form->passwordField($model,'password',array('placeholder'=>'******','style'=>'width: 300px','required'=>'required')); ?>
      </div>

      <div class="control-group forgot">
        <?php echo $form->checkBox($model,'rememberMe',array('style'=>'width: 15px')); ?>
        <?php echo $form->label($model,'rememberMe',array('class'=>'checkbox')); ?>
      </div>

      <div>
        <?php echo CHtml::submitButton('Login', array('class'=>'btn btn-success')); ?>
      </div>
		<?php $this->endWidget(); ?>
	</div>
</div>